/**
 * @file abort.c
 * @brief
 * @author h0rr0rr_drag0n <h0rr0rr_drag0n@vindekapets.ru
 * @date 02 Июль 2010 21:25:43
 *
 * Check for abort flag and execute proper funcs.
 */

#include <stdlib.h>
#include "define.h"

extern volatile int abort_flag;

/**
 * @brief Actions when SIGABRT comes
 *
 * Execute actions when SIGABRT comes
 */
void catch_sigabrt() {
    emerg_exit();

    return;
}

/**
 * @brief Check for SIGABRT
 *
 * We check abort_flag - is INT or QUIT signals come.
 */
int check_sigabrt() {
    if (abort_flag) {
        catch_sigabrt();
    }

    return 0;
}

